//
//  EngineeringTableViewCell.swift
//  BusinessIOS
//
//  Created by Rain on 2018/11/2.
//  Copyright © 2018 XingJian Li. All rights reserved.
//

import UIKit


class EngineeringTableViewCell: UITableViewCell {

    var Engineering:EngineeringButton!
    
    var MyJob:EngineeringButton!
    
    
    var complete:EngineeringButton!
    
    var information:EngineeringButton!
    
    required init?(coder aDecoder: NSCoder) {
        
        super.init(coder: aDecoder)
        
    }

    
    override init(style: UITableViewCellStyle, reuseIdentifier: String?) {
        
        super.init(style: style, reuseIdentifier: reuseIdentifier)
        
        self.lauoutUI()
    }

    func lauoutUI(){
        
        
        Engineering = EngineeringButton(type:.custom)
        Engineering.nameImageView.image = UIImage(named:"luru")
        Engineering.nameLabel.text = "项目录入"
        Engineering.tag = 1001
        self.contentView.addSubview(self.Engineering!)
        
        
        
        MyJob = EngineeringButton(type:.custom)
        MyJob.tag = 1002
        MyJob.nameLabel.text = "我的待办"
        MyJob.nameImageView.image = UIImage(named:"daiban")
       self.contentView.addSubview(self.MyJob!)
        
        
        
        complete = EngineeringButton(type:.custom)
        complete.nameImageView.image = UIImage(named:"yiban")
        complete.nameLabel.text = "我的已办"
        
        complete.tag = 1003
        self.contentView.addSubview(self.complete!)
        
        
        
        information = EngineeringButton(type:.custom)
        
        information.tag = 1004
        information.nameImageView.image = UIImage(named:"xinxiku")
        information.nameLabel.text = "企业信息"
 
        self.contentView.addSubview(self.information!)
        
        
        
        
    }
    override func layoutSubviews() {

        super.layoutSubviews()
        
        let aaa = self.frame.size.width/4
        
        self.Engineering.frame = CGRect(x: 0, y: 0, width: aaa, height: 80)
        
        self.MyJob.frame = CGRect(x: aaa, y: 0, width: aaa, height: 80)
        self.complete.frame = CGRect(x: aaa * 2, y: 0, width: aaa, height: 80)
        
        self.information.frame = CGRect(x: aaa * 3, y: 0, width: aaa, height: 80)
        
    }

}
